<!--  -->
<template>
    <div class='cardVerification'>
        <el-collapse v-model="activeNames" @change="handleChange">
            <el-collapse-item title="会员信息" name="1">
                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="260px" class="demo-ruleForm"
                    size="mini">
                    <div style="display:flex;">
                        <el-form-item label="会员姓名" prop="name">
                            {{ruleForm.name}}
                        </el-form-item>
                        <el-form-item label="会员卡号" prop="name">
                            {{ruleForm.cardNum}}
                        </el-form-item>
                        <el-form-item label="开卡时间" prop="name">
                            {{ruleForm.time}}
                        </el-form-item>
                    </div>
                    <div style="display:flex;">
                        <el-form-item label="售卡部门" prop="name">
                            {{ruleForm.dept}}
                        </el-form-item>
                        <el-form-item label="售卡员" prop="name">
                            {{ruleForm.cardSeller}}
                        </el-form-item>
                        <el-form-item label="保险是否开通" prop="name">
                            {{ruleForm.open}}
                        </el-form-item>
                    </div>
                </el-form>
            </el-collapse-item>
            <!-- <el-collapse-item title="资产信息" name="2">
                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="260px" class="demo-ruleForm"
                    size="mini">
                    <div style="display:flex;">
                        <el-form-item label="可提现零钱" prop="name">
                            {{ruleForm.withdraw}}
                        </el-form-item>
                        <el-form-item label="不可提现零钱" prop="name">
                            {{ruleForm.smallChange}}
                        </el-form-item>
                        <el-form-item label="积分" prop="name">
                            {{ruleForm.integral}}
                        </el-form-item>
                    </div>
                    <div style="display:flex;">
                        <el-form-item label="plus" prop="name">
                            {{ruleForm.plus}}
                        </el-form-item>
                        <el-form-item label="礼品卷" prop="name">
                            {{ruleForm.voucher}}
                        </el-form-item>
                        <el-form-item label="随行次数" prop="name">
                            {{ruleForm.count}}
                        </el-form-item>
                    </div>
                </el-form>
            </el-collapse-item> -->
            <el-collapse-item title="卡信息" name="3">
                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="200px" class="demo-ruleForm"
                    size="mini">
                    <div style="display:flex;">
                        <el-form-item label="开卡金额" prop="name">
                            <el-input v-model="ruleForm.openCard" ></el-input>
                        </el-form-item>
                        <el-form-item label="扣会员保费" prop="name">
                            <el-input v-model="ruleForm.memberPremiums" placeholder=""></el-input>
                        </el-form-item>
                        <el-form-item label="折旧费" prop="name">
                            <el-input v-model="ruleForm.depreciationmoney" placeholder=""></el-input>
                        </el-form-item>
                    </div>
                    <div style="display:flex;">
                        <el-form-item label="扣plus抵扣费" prop="name">
                            <el-input v-model="ruleForm.deductPlusDeductTheFullAmount" placeholder=""></el-input>
                        </el-form-item>
                        <el-form-item label="扣礼品抵扣额" prop="name">
                            <el-input v-model="ruleForm.deductGiftCertificateForFullDeduction" placeholder=""></el-input>
                        </el-form-item>
                        <el-form-item label="扣回赠机票款" prop="name">
                            <el-input v-model="ruleForm.deductionOfTheNumberOfRewardTickets" placeholder=""></el-input>
                        </el-form-item>
                    </div>
                    <div style="display:flex;">
                        <el-form-item label="促销活动费用" prop="name">
                            <el-input v-model="ruleForm.promotionalCost" placeholder=""></el-input>
                        </el-form-item>
                        <el-form-item label="员工承担费用" prop="name">
                            <el-input v-model="ruleForm.employeeguaranteemoney" placeholder=""></el-input>
                        </el-form-item>
                        <el-form-item label="扣体检费" prop="name">
                            <el-input v-model="ruleForm.deductionOfExperienceFee" placeholder=""></el-input>
                        </el-form-item>
                    </div>
                    <div style="display:flex;">
                        
                        <el-form-item label="合作厅使用次数" prop="name">
                            <el-input v-model="ruleForm.numberTimesSelfOperatedHallUsed" placeholder=""></el-input>
                        </el-form-item>
                        <el-form-item label="扣挂号费" prop="name">
                            <el-input v-model="ruleForm.deductionOfRegistrationFee" placeholder=""></el-input>
                        </el-form-item>
                        <!-- <el-form-item label="自营厅使用次数" prop="name">
                            <el-input v-model="ruleForm.theNumberOfTimesTheSelfOperatedHallIsUsed" placeholder=""></el-input>
                        </el-form-item> -->
                    </div>
                    <div style="display:flex;">
                        
                        <el-form-item label="安检使用次数" prop="name">
                            <el-input v-model="ruleForm.securityCheckTimes" placeholder=""></el-input>
                        </el-form-item>
                        <el-form-item label="应退金额" prop="name">
                            <el-input v-model="ruleForm.openCard" placeholder=""></el-input>
                        </el-form-item>
                        <!-- <el-form-item label="滴滴代驾卷费" prop="name">
                            <el-input v-model="ruleForm.deductionOfDidiDrivingVoucherFee" placeholder=""></el-input>
                        </el-form-item> -->
                    </div>
                    <!-- <div style="display:flex;">
                        <el-form-item label="扣家医费" prop="name">
                            <el-input v-model="ruleForm.deductionOfMedicalExpenses" placeholder=""></el-input>
                        </el-form-item>
                    </div> -->
                    <!-- <div style="display:flex;">
                        <el-form-item label="支付方式" prop="name">
                            {{ruleForm.aaa}}
                        </el-form-item>
                        <el-form-item label="流水号" prop="name">
                            {{ruleForm.aaa}}
                        </el-form-item>
                        <el-form-item label="时间" prop="name">
                            {{ruleForm.aaa}}
                        </el-form-item>
                    </div> -->
                </el-form>
            </el-collapse-item>
            <!-- <el-collapse-item title="扣除剩余资产" name="4">
                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="260px" class="demo-ruleForm"
                    size="mini">
                    <div style="display:flex;">
                        <el-form-item label="扣除剩余plus" prop="name">
                            <el-input v-model="ruleForm.deductRemainingPlus" placeholder=""></el-input>
                        </el-form-item>
                        <el-form-item label="扣除剩余礼品卷" prop="name">
                            <el-input v-model="ruleForm.deductRemainingGiftVouchers" placeholder=""></el-input>
                        </el-form-item>
                    </div>
                </el-form>
            </el-collapse-item> -->
            <el-collapse-item title="退款方式" name="5">
                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm"
                    size="mini">
                    <div>
                        <el-form-item label="">
                            <el-radio-group v-model="ruleForm.refundMethod">
                                <el-radio label="0">退至银行卡</el-radio>
                                <el-radio label="1">退至预留款</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </div>
                    <div style="display:flex;" v-if="ruleForm.refundMethod=='0'">
                        <el-form-item label="开户行" prop="name">
                            <el-input style="width:260px;" v-model="ruleForm.bank" placeholder=""></el-input>
                        </el-form-item>
                        <el-form-item label="户名" prop="name">
                            <el-input v-model="ruleForm.username" placeholder=""></el-input>
                        </el-form-item>
                        <el-form-item label="卡号" prop="name">
                            <el-input style="width:280px;" v-model="ruleForm.cardNumber" placeholder=""></el-input>
                        </el-form-item>
                    </div>
                    <div style="display:flex;" v-if="ruleForm.refundMethod=='0'">
                        <el-form-item label="开户地" prop="name">
                            <el-input style="width:600px;" v-model="ruleForm.accountOpening" placeholder=""></el-input>
                        </el-form-item>
                    </div>
                    <div>
                        <el-form-item label="退卡原因">
                            <el-checkbox-group v-model="ruleForm.lstRemark">
                                <el-checkbox label="1" name="type">购卡费充值在会员卡中</el-checkbox><br />
                                <el-checkbox label="2" name="type">业务员告知客户错误会员卡/续费有效期</el-checkbox><br />
                                <el-checkbox label="3" name="type">贵宾厅服务长期有效</el-checkbox><br />
                                <el-checkbox label="4" name="type">出行抵扣券长期有效</el-checkbox><br />
                                <el-checkbox label="5" name="type">业务员未告知出抵扣券有效期为一年</el-checkbox><br />
                                <el-checkbox label="6" name="type">业务员未告知贵宾厅有效期为一年</el-checkbox><br />
                                <el-checkbox label="7" name="type">城市没有贵宾厅/餐厅</el-checkbox><br />
                                <el-checkbox label="8" name="type">航班取消无法理赔</el-checkbox><br />
                                <el-checkbox label="9" name="type">随行没有贵宾厅休息</el-checkbox><br />
                                <el-checkbox label="10" name="type">客户办理后反悔</el-checkbox><br />
                                <el-checkbox label="11" name="type">非我司预订机票，无法享受航班延误理赔</el-checkbox><br />
                                <!-- <el-checkbox label="无理由退卡" name="type">无理由退卡</el-checkbox><br /> -->
                                <el-checkbox label="12" name="type">其他</el-checkbox><br />
                            </el-checkbox-group>
                        </el-form-item>
                    </div>
                    <div style="display:flex;">
                        <el-form-item label="退卡其他原因" prop="name">
                            <el-input type="textarea" :rows="2" style="width:600px;" v-model="ruleForm.reason"
                                placeholder=""></el-input>
                        </el-form-item>
                    </div>
                </el-form>
            </el-collapse-item>
            <el-collapse-item title="操作信息" name="6">
                    <el-table :header-cell-style="{  color: '#fff', background: '#6090EC', fontSize: '11px', fontWeight: 'normal', }" 
                    id="tableTop" :data="ruleForm.dailyRecordVoList" size="mini" border stripe>
                    <el-table-column label="项目" prop="project" width="120px"></el-table-column>
                    <el-table-column label="操作人" prop="operator" width="160px"></el-table-column>
                    <el-table-column label="操作时间" prop="operationTime" width="300px"></el-table-column>
                    <el-table-column label="操作内容" prop="operationContent"></el-table-column>
                    </el-table>
            </el-collapse-item>
        </el-collapse>
        <div style="margin:20px 0 0 20px">
            <el-button v-if="state=='修改'" type="primary" @click="Modify">确认修改</el-button>
            <el-button type="primary" @click="previoupage">返回</el-button>
        </div>
        
    </div>
</template>

<script>
    export default {
        name: 'cardVerification',
        data() {
            //这里存放数据
            return {
                // 会员卡id
                customerCardId:"",
                // 操作信息
                auxiliary:[],
                // 审核状态
                state: "",
                // 默认展示所有
                activeNames: ['1', '2', '3', '4', '5', '6'],
                ruleForm: {
                    refundMethod: '0',
                    lstRemark: [],
                    openCard:0,
                    memberPremiums:0,
                    depreciation:0,
                    deductPlusDeductTheFullAmount:0,
                    deductGiftCertificateForFullDeduction:0,
                    deductionOfTheNumberOfRewardTickets:0,
                    promotionalCost:0,
                    deductionOfExperienceFee:0,
                    openCard:0,
                    employeeguaranteemoney:0,
                    deductionOfRegistrationFee:0,
                    theNumberOfTimesTheSelfOperatedHallIsUsed:0,
                    numberTimesSelfOperatedHallUsed:0,
                    securityCheckTimes:0,
                    deductionOfDidiDrivingVoucherFee:0,
                    deductionOfMedicalExpenses:0,
                    deductRemainingPlus:0,
                    deductRemainingGiftVouchers:0,
                    reason:""
                },
                // 校验
                rules: {
                    name: [{
                        required: true,
                        message: '请输入活动名称',
                        trigger: 'blur'
                    }, ],
                }
            }
        },
        components: {},

        //方法集合
        methods: {
            getcardRefundDetails(){
                this.$axios.getcardRefundDetails({
                    // id:"106",
                    id:this.customerCardId,
                }).then((res)=>{
                    console.log(res)
                    if(res.code==200){
                        this.ruleForm=res.data
                        console.log(this.ruleForm)
                    if(this.ruleForm.open=='false'){
                        this.ruleForm.open ='否'
                    }else{
                        this.ruleForm.open ='是'
                    }
                    }
                })
            },
            // 确认修改按钮
            Modify(){
                console.log(111)
            },
            // 返回按钮
            previoupage(){
                this.$router.push({ 
                    name:"refundCardAudit"
                })
            },
            // 折叠面板点击事件
            handleChange(val) {
                console.log(val);
            },
           
        },
        created() {

        },
        mounted() {
            this.state = this.$route.params.state
            this.customerCardId = this.$route.params.customerCardId
            console.log(this.customerCardId)
            this.getcardRefundDetails()
        }
    }
</script>
<style scoped>
    .cardVerification {
        margin: 20px;
    }
</style>